import * as types from '../mutation-types';
import { typeOf } from 'common/js/utils';

export default {
  // 设置字典树state
  [types.SET_DICT_TREE](state, tree) {
    state.dictTree = tree;
  },
  // 设置产品单位state
  [types.SET_UNIT](state, unit) {
    state.unit = unit;
  },
  // 设置产品来源state
  [types.SET_SOURCE](state, source) {
    state.source = source;
  },
  // 设置产品状态上架state
  [types.SET_SALESTATE](state, saleState) {
    state.saleState = saleState;
  },
  // 设置附件类别state
  [types.SET_FILETYPE](state, filetype) {
    state.filetype = filetype;
  },
  // 设置合同类型state
  [types.SET_CONTRACT](state, contract) {
    state.contract = contract;
  },
  // 设置所属区域state
  [types.SET_REGION](state, region) {
      state.region = region;
  },
  // 设置客户来源state
  [types.SET_CUSTOMER_SOURCE](state, customerSource) {
      state.customerSource = customerSource;
  },
  // 设置客户标签state
  [types.SET_CUSTOMER_TAG](state, customerTag) {
      state.customerTag = customerTag;
  },
  // 设置所属行业state
  [types.SET_CUSTOMER_INDUSTRY](state, customerIndustry) {
      state.customerIndustry = customerIndustry;
  },
  // 设置报销项state
  [types.SET_CUSTOMER_COST_TYPE](state, customerCostType) {
      state.customerCostType = customerCostType;
  },
  [types.SET_PERSONLIST](state, personList) {
    state.personList = personList;
  }
};
